﻿<phone:PhoneApplicationPage 
    x:Class="DevPhoneToolkitSample.Samples.DropDownControlBasicSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:DevPhone="clr-namespace:DevPhone.Controls;assembly=DevPhone.Controls.Toolkit"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <Border Background="White" VerticalAlignment="Top" BorderBrush="Gray" BorderThickness="1">
                <Image Name="Logo" Source="/DevPhoneToolkitSample;component/Images/DevPhoneToolkit.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" />
            </Border>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1">
            <ScrollViewer>
                <StackPanel>
                    <StackPanel Margin="12,5,12,0">
                        <TextBlock Text="DropDown - Basic Sample" FontSize="32"/>
                        <TextBlock Text="Sample with xaml values using DropDownItem " />
                        <StackPanel Orientation="Horizontal" RenderTransformOrigin="0.5,0.5" Margin="0,-20,0,0" HorizontalAlignment="Left">
                            <TextBlock TextWrapping="Wrap" Text="Alignment" Margin="0,2,0,0" VerticalAlignment="Center" FontSize="20"/>
                            <RadioButton x:Name="OptLeft" Content="Left" Margin="0,5,0,0" RenderTransformOrigin="0.5,0.5" Click="OptLeftClick">
                                <RadioButton.RenderTransform>
                                    <CompositeTransform ScaleX="0.9" ScaleY="0.9"/>
                                </RadioButton.RenderTransform>
                            </RadioButton>
                            <RadioButton x:Name="OptRight" Content="Right" Margin="0,5,0,0" RenderTransformOrigin="0.5,0.5"  IsChecked="True" Click="OptRightClick">
                                <RadioButton.RenderTransform>
                                    <CompositeTransform ScaleX="0.9" ScaleY="0.9"/>
                                </RadioButton.RenderTransform>
                            </RadioButton>
                            <RadioButton x:Name="OptCenter" Content="Center" Margin="0,5,0,0" RenderTransformOrigin="0.5,0.5" Click="OptCenterClick">
                                <RadioButton.RenderTransform>
                                    <CompositeTransform ScaleX="0.9" ScaleY="0.9"/>
                                </RadioButton.RenderTransform>
                            </RadioButton>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Margin="12,0,12,20">
                        <DevPhone:DropDownControl x:Name="Cbo1" Header="Basic Sample - ItemCountThreshold=3 (Default)">
                            <DevPhone:DropDownItem Content="Item1"/>
                            <DevPhone:DropDownItem Content="Item2"/>
                            <DevPhone:DropDownItem Content="Item3"/>
                            <DevPhone:DropDownItem Content="Item4"/>
                            <DevPhone:DropDownItem Content="Item5"/>
                            <DevPhone:DropDownItem Content="Item6"/>
                            <DevPhone:DropDownItem Content="Item7"/>
                            <DevPhone:DropDownItem Content="Item8"/>
                            <DevPhone:DropDownItem Content="Item9"/>
                        </DevPhone:DropDownControl>
                        <DevPhone:DropDownControl x:Name="Cbo2" Header="Basic Sample - SeletedItem/SelectedIndex" Margin="0,20,0,0" SelectedItem="Item3">
                            <DevPhone:DropDownItem Content="Item1"/>
                            <DevPhone:DropDownItem Content="Item2"/>
                            <DevPhone:DropDownItem Content="Item3"/>
                            <DevPhone:DropDownItem Content="Item4"/>
                            <DevPhone:DropDownItem Content="Item5"/>
                            <DevPhone:DropDownItem Content="Item6"/>
                            <DevPhone:DropDownItem Content="Item7"/>
                            <DevPhone:DropDownItem Content="Item8"/>
                            <DevPhone:DropDownItem Content="Item9"/>
                        </DevPhone:DropDownControl>
                        <DevPhone:DropDownControl x:Name="Cbo3" Header="Basic Sample - colors and ItemCountThreshold=2" Margin="0,20,0,0" SelectedIndex="0" EllipseBrush="#FFE2771B" EllipseArrow="#FF1DFFB9" ControlBackground="#72F83900" ControlForeground="#FFEBFF00" ItemCountThreshold="2">
                            <DevPhone:DropDownItem Content="Item1"/>
                            <DevPhone:DropDownItem Content="Item2"/>
                            <DevPhone:DropDownItem Content="Item3"/>
                            <DevPhone:DropDownItem Content="Item4"/>
                            <DevPhone:DropDownItem Content="Item5"/>
                            <DevPhone:DropDownItem Content="Item6"/>
                            <DevPhone:DropDownItem Content="Item7"/>
                            <DevPhone:DropDownItem Content="Item8"/>
                            <DevPhone:DropDownItem Content="Item9"/>
                        </DevPhone:DropDownControl>
                        <DevPhone:DropDownControl Header="Basic Sample - Disabled" Margin="0,20,0,0" SelectedIndex="0" IsEnabled="False" >
                            <DevPhone:DropDownItem Content="Item1"/>
                        </DevPhone:DropDownControl>
                        <TextBlock Text=" " FontSize="24" />
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
